package com.zyg.service.impl;

import com.zyg.dao.ClassMapper;
import com.zyg.pojo.Class;
import com.zyg.service.ClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("classService")
public class ClassServiceImpl implements ClassService {


    @Autowired
    private ClassMapper classMapper;

    @Override
    public List<Class> findAll(Class classInfo, int offset, int pageSize) {
        return classMapper.findAll(classInfo, offset, pageSize);
    }

    @Override
    public List<Class> getClassList() {
        return classMapper.getClassList();
    }

    @Override
    public int addClass(Class classInfo) {
        return classMapper.addClass(classInfo);
    }

    @Override
    public int deleteClass(int id) {
        return classMapper.deleteClass(id);
    }

    @Override
    public Class findClassById(int id) {
        return classMapper.findClassById(id);
    }

    @Override
    public int updateClass(Class classInfo) {
        return classMapper.updateClass(classInfo);
    }


    @Override
    public int count(Class classInfo) {
        return classMapper.count(classInfo);
    }
}
